package com.meituan.sdk.model.ddzh.thirdresource.syncDeviceInfo;

import com.meituan.sdk.annotations.ApiMeta;
import java.util.List;
import com.google.gson.reflect.TypeToken;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;
import javax.validation.constraints.NotEmpty;

/**
* 同步门店下设备信息接口
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzh/thirdresource/syncdeviceinfo",
    businessId = 58,
    apiVersion = "10023",
    apiName = "sync_device_info",
    needAuth = true
)
public class SyncDeviceInfoRequest implements MeituanRequest<SyncDeviceInfoResponse> {
    /**
    * <p data-diff-id="ct-diff-id-28f1863e-8322-496f-9d91-4d7356bca14a">timestamp</p>
    */
    @NotNull(message = "timestamp不能为空")
    @SerializedName("timestamp")
    private Long timestamp;
    /**
    * <p data-diff-id="ct-diff-id-f06a5454-d77a-45c7-9885-18e4304dcf75">设备信息发生变更的设备列表</p>
    */
    @NotEmpty(message = "deviceItems不能为空")
    @SerializedName("deviceItems")
    private List<UnifiedDeviceItem> deviceItems;

    public Long getTimestamp() {
        return timestamp;
    }
    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }
    public List<UnifiedDeviceItem> getDeviceItems() {
        return deviceItems;
    }
    public void setDeviceItems(List<UnifiedDeviceItem> deviceItems) {
        this.deviceItems = deviceItems;
    }


    @Override
    public MeituanResponse<SyncDeviceInfoResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<SyncDeviceInfoResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "SyncDeviceInfoRequest{" + "timestamp=" + timestamp + "," + "deviceItems=" + deviceItems + "}";
    }
}
